export { }


class Person {
    name: string;
    age: number;
    constructor(name: string, age: number) {
        this.name = name;
        this.age = age;
    }
    getName(): string {
        return this.name;
    }
    setName(name: string): void {
        this.name = name
    }
}

// 实例化类
// let p1 = new Person('zhuzhu',17);
// p1.name = 'gougou'
// console.log(p1,'p1');  // Person { name: 'gougou', age: 17 } p1
// console.log(p1.getName()); // gougou


class Student extends Person {
    stuNo: number;
    constructor(name: string, age: number, stuNo: number) {
        super(name, age);
        this.stuNo = stuNo;
    }
    getStuNo() {
        console.log(this.stuNo, '获取属性');

        return this.stuNo
    }
}

let s1 = new Student('zhufeng', 11, 1)
